﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GISCore.Geometry;

namespace GISTools.Generators
{
    internal class RandomMapGenerator : IMapGenerator
    {
        private Layer Map { get; set; }

        /// <summary>
        /// Creates an instance of RandomMapGenerator
        /// </summary>
        /// <param name="seed">A stream to a layer as an initial seed</param>
        internal RandomMapGenerator(Layer seed)
        {
            Map = seed;
        }

        /// <summary>
        /// Generate a map with psuedorandom permuted polygons
        /// </summary>
        /// <returns></returns>
        public Layer Generate()
        {
            var rndm = new System.Random();
            var list = new List<Polygon>();
            foreach (var poly in Map.GetPolygons())
            {
                // flip a coin to determine if we should this polygon's duplicate 
                if (rndm.Next(2) == 0)
                {

                }
            }
            return null;
        }
    }
}
